home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 20 / 9 / DISK2092.ZIP / RBBS-LIT.ZIP / LIT / PCNET.LIT < prev    next >
Text File  |  1990-01-13  |  4KB  |  139 lines

  1. *[PCNET.LIT]******************************************************************
  2. * Description: Provide support for Orchid PC-NET multi node file locking.    *
  3. * RBBS-PC Level: CPC17.3                                                √ AM *
  4. * Module Affected: RBBSSUB3.BAS                                              *
  5. * Selection Option: MULTINODE = PCNET                                        *
  6. * Additional files: None                                                     *
  7. ******************************************************************************
  8. 22000 IF ZMsgFileLock = ZTrue THEN _
  9.          RETURN
  10.       ZMsgFileLock = ZTrue
  11.       MID$(ZLockStatus$,1,2) = "LM"
  12.       ZSubParm = 2
  13.       CALL Line25
  14.       ZLockFileName$ = ZActiveMessageFile$
  15.       IF ZNetworkType > 0 THEN GOTO 22300
  16.       RETURN
  17. 22100
  18. 22200
  19. 22300 GOSUB 28100
  20.       CALL LPLKIT(ZLockDrive,ZLockFileName$,ZWasA)
  21.       RETURN
  22. 22400
  23. 22500
  24. 25000 IF NOT ZMsgFileLock THEN _
  25.          RETURN
  26.       ZMsgFileLock = ZFalse
  27.       MID$(ZLockStatus$,1,2) = "UM"
  28.       ZSubParm = 2
  29.       CALL Line25
  30.       ZLockFileName$ = ZActiveMessageFile$
  31.       IF ZNetworkType > 0 THEN GOTO 25300
  32.       RETURN
  33. 25100
  34. 25200
  35. 25300 GOSUB 28100
  36.       CALL UNLOKIT(ZLockDrive,ZLockFileName$,ZWasA)
  37.       RETURN
  38. 25400
  39. 25500
  40. 26000 IF ZUserFileLock = ZTrue THEN _
  41.          RETURN
  42.       ZUserFileLock = ZTrue
  43.       MID$(ZLockStatus$,4,2) = "LU"
  44.       ZSubParm = 2
  45.       CALL Line25
  46.       ZLockFileName$ = ZActiveUserFile$
  47.       IF ZNetworkType > 0 THEN GOTO 22300
  48.       RETURN
  49. 26100
  50. 26200
  51. 26300
  52. 26500 IF ZUserBlockLock = ZTrue THEN _
  53.          RETURN
  54.       ZUserBlockLock = ZTrue
  55.       ZBlk = (ZUserFileIndex / 4) + .26
  56.       MID$(ZLockStatus$,7,2) = "LB"
  57.       ZSubParm = 2
  58.       CALL Line25
  59.       IF ZNetworkType > 0 THEN GOTO 26800
  60.       RETURN
  61. 26600
  62. 26700
  63. 26750
  64. 26800 ZLockFileName$ = LEFT$(ZActiveUserFile$,2) + _
  65.                         "BLK" + _
  66.                         RIGHT$("0000" + MID$(STR$(ZBlk),2),5)
  67.       GOTO 22300
  68. 26900
  69. 27000 IF NOT ZUserFileLock THEN _
  70.          RETURN
  71.       ZUserFileLock = ZFalse
  72.       MID$(ZLockStatus$,4,2) = "UU"
  73.       ZSubParm = 2
  74.       CALL Line25
  75.       ZLockFileName$ = ZActiveUserFile$
  76.       IF ZNetworkType > 0 THEN GOTO 25300
  77.       RETURN
  78. 27100
  79. 27200
  80. 27300
  81. 27500 IF NOT ZUserBlockLock THEN _
  82.          RETURN
  83.       ZUserBlockLock = ZFalse
  84.       ZBlk = (ZUserFileIndex / 4) + .26
  85.       MID$(ZLockStatus$,7,2) = "UB"
  86.       ZSubParm = 2
  87.       CALL Line25
  88.       IF ZNetworkType > 0 THEN GOTO 27800
  89.       RETURN
  90. 27600
  91. 27700
  92. 27750
  93. 27800 ZLockFileName$ = LEFT$(ZActiveUserFile$,2) + _
  94.                         "BLK" + _
  95.                         RIGHT$("0000" + MID$(STR$(ZBlk),2),5)
  96.       GOTO 25300
  97. 27900
  98. 28000
  99. 28010
  100. 28100 CALL AllCaps (ZLockFileName$)
  101.       ZLockDrive = ASC(LEFT$(ZLockFileName$,1)) - ASC("A")
  102.       ZLockFileName$ = ZLockFileName$ + _
  103.                         STRING$(32 - LEN(ZLockFileName$),0)
  104.       ZWasA = 0
  105.       RETURN
  106. 29000 IF LockedEn$ = ZWasEN$ THEN _
  107.          RETURN
  108.       LockedEn$ = ZWasEN$
  109.       MID$(ZLockStatus$,10,2) = "LD"
  110.       ZSubParm = 2
  111.       CALL Line25
  112.       ZLockFileName$ = ZWasEN$
  113.       IF ZNetworkType > 0 THEN GOTO 22300
  114. 29010 RETURN
  115. 29100
  116. 29300
  117. 29500 IF LockedEn$ <> ZWasEN$ THEN _
  118.          RETURN
  119.       LockedEn$ = ""
  120.       MID$(ZLockStatus$,10,2) = "UD"
  121.       ZSubParm = 2
  122.       CALL Line25
  123.       ZLockFileName$ = ZWasEN$
  124.       IF ZNetworkType > 0 THEN GOTO 25300
  125. 29510 RETURN
  126. 29600
  127. 29650
  128. 29700
  129. 29710
  130. 29720
  131. 29730
  132. 29800
  133. 29810
  134. 29820
  135. 29830 END SUB
  136. 30000 SUB InitIBM STATIC
  137.       END SUB
  138. 30020
  139.